From d72ede734de97c250c440f18d8f056f666bf5448 Mon Sep 17 00:00:00 2001 From: Ian Jackson Date: Thu, 2 Jun 2011 18:46:32 +0100 Subject: [PATCH] libxl: provide TOSTRING in libxl_internal.h and libxlu_internal.h Provide a copy of the standard TOSTRING macro in libxlu_internal.h, for the benefit of patches later in this series. Also, move TOSTRING to libxl_internal.h from a .c file for the benefit of future other callers in libxl proper. (These cannot be combined because libxlu cannot include libxl_internal.h and libxl should not include libxlu_internal.h.) Signed-off-by: Ian Jackson Committed-by: Ian Jackson --- tools/libxl/libxl.c | 2 -- tools/libxl/libxl_internal.h | 4 ++++ tools/libxl/libxlu_internal.h | 4 ++++ 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/tools/libxl/libxl.c b/tools/libxl/libxl.c index f4f65c698c..344eec3cdf 100644 --- a/tools/libxl/libxl.c +++ b/tools/libxl/libxl.c @@ -38,8 +38,6 @@ #define PAGE_TO_MEMKB(pages) ((pages) * 4) #define BACKEND_STRING_SIZE 5 -#define STRINGIFY(x) #x -#define TOSTRING(x) STRINGIFY(x) int libxl_ctx_alloc(libxl_ctx **pctx, int version, xentoollog_logger * lg) { diff --git a/tools/libxl/libxl_internal.h b/tools/libxl/libxl_internal.h index 17d7e946e4..3d3bf52f0c 100644 --- a/tools/libxl/libxl_internal.h +++ b/tools/libxl/libxl_internal.h @@ -370,4 +370,8 @@ _hidden int libxl__file_reference_map(libxl_file_reference *f); _hidden int libxl__file_reference_unmap(libxl_file_reference *f); _hidden int libxl__e820_alloc(libxl_ctx *ctx, uint32_t domid, libxl_domain_config *d_config); + +#define STRINGIFY(x) #x +#define TOSTRING(x) STRINGIFY(x) + #endif diff --git a/tools/libxl/libxlu_internal.h b/tools/libxl/libxlu_internal.h index e251a639a8..9c609b1495 100644 --- a/tools/libxl/libxlu_internal.h +++ b/tools/libxl/libxlu_internal.h @@ -45,4 +45,8 @@ typedef struct { void *scanner; } CfgParseContext; + +#define STRINGIFY(x) #x +#define TOSTRING(x) STRINGIFY(x) + #endif /*LIBXLU_INTERNAL_H*/ -- 2.30.2